package com.crscd.ai.assistant;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2025/9/23-22:06
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@AiService(
    wiringMode = EXPLICIT,
    chatModel = "qwenChatModel",
    chatMemory = "chatMemory",
    chatMemoryProvider = "chatMemoryProvider",
    tools = "calculatorTools")
public interface SeparateChatAssistant {
  /**
   * Chat string.
   *
   * @param memoryId the memory id
   * @param userMessage the user message
   * @return the string
   */
  @SystemMessage(fromResource = "my-prompt-template.txt")
  String chat(@MemoryId int memoryId, @UserMessage String userMessage);

  /**
   * Chat 2 string.
   *
   * @param memoryId the memory id
   * @param userMessage the user message
   * @return the string
   */
  @UserMessage("你是我的好朋友，请用东北话回答问题。{{msg}}")
  String chat2(@MemoryId int memoryId, @V("msg") String userMessage);

  /**
   * Chat 3 string.
   *
   * @param memoryId the memory id
   * @param userMessage the user message
   * @param username the username
   * @param age the age
   * @return the string
   */
  @SystemMessage(fromResource = "my-prompt-template2.txt")
  String chat3(
      @MemoryId int memoryId,
      @UserMessage String userMessage,
      @V("username") String username,
      @V("age") int age);
}
